<?php /*a:3:{s:63:"/www/wwwroot/pay.rym.best/application/user/wap/login/index.html";i:1563242606;s:65:"/www/wwwroot/pay.rym.best/application/user/wap/common/head_s.html";i:1563242604;s:65:"/www/wwwroot/pay.rym.best/application/user/wap/common/footer.html";i:1563242602;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title><?php echo htmlentities($title); ?>-<?php echo htmlentities($sys['name']); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="<?php echo htmlentities($sys['key']); ?>">
    <meta name="description" content="<?php echo htmlentities($sys['des']); ?>">
    <link rel="shortcut icon" href="/favicon.ico"/>  
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/user/css/main_wap.css">
    <link rel="stylesheet" href="/static/common/css/font.css" media="all">  
</head>

<script src="/static/plugins/layui/layui.js"></script> 
<script src='https://cdn.bootcss.com/socket.io/2.0.3/socket.io.js'></script>  
<script type="text/javascript">
function playv(){
    //消息提示音
    var audio = document.createElement("audio");
    if (audio.canPlayType("audio/mp3")) {
        audio.src = "/static/default.mp3";
    }else if(audio.canPlayType("audio/ogg")) {
        audio.src = "/static/default.ogg";
    } 
    audio.play();//消息提示音 END    
}
// 订单消息同步通知 
var socket = io('http://'+document.domain+':2120');   // 连接服务端
socket.on('new_msg', function(msg){ // 后端推送来消息时            
    arr=msg.split("|");
    var m_userid=arr[0];
    var m_agentid=arr[1];
    var userid="<?php echo htmlentities($userInfo['id']); ?>"; 
    var voice="<?php echo htmlentities($userInfo['voice']); ?>"; 
    if(m_userid!='0' && m_userid==userid){                
        layer.msg("您有新订单提醒",{time:2000,icon:1},function(){   
            location.href ="<?php echo url('user/order/index'); ?>"; 
        });     
        if(voice=='open'){
            playv();
        }  
    }
    if(m_agentid!='0' && m_agentid==userid){             
        layer.msg("您有新的代理订单提醒",{time:2000,icon:1},function(){  
            location.href ="<?php echo url('user/agent/orderlist'); ?>"; 
        });          
        if(voice=='open'){
            playv();
        }  
    } 
});  
</script>

<body> 
<div class="rl_main">
<div class="log_box box_pan layui-clear">  
    <div class="log_logo"><img src="<?php echo htmlentities($sys['logo']); ?>" alt="<?php echo htmlentities($sys['name']); ?>"></div>
    <form method="post" class="layui-form layui-form-pane">
        <div class="layui-form-item">
            <input type="text" id="username" name="username" required lay-verify="required|phone" placeholder="请输入手机号" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-item">
            <!-- <div class="rtip"><a href="<?php echo url('forget'); ?>" class="layui-btn layui-btn-xs layui-btn-primary">忘记？</a></div> -->
            <input type="password" id="L_pass" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
        </div>
        <?php if($sys['code']=='open'): ?>
        <div class="layui-form-item">
            <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="验证码" autocomplete="off" class="layui-input">
            <div class="rtip"><img src="<?php echo url('verify'); ?>" alt="captcha" onclick="this.src='<?php echo url("verify"); ?>?'+'id='+Math.random()"/></div>
        </div>
        <?php endif; ?>
        <div class="layui-form-item"><button type="submit" class="layui-btn layui-btn-fluid layui-btn-warm" lay-filter="logsub" lay-submit>立即登录</button></div>
        <div style="width: 100%; text-align: center;"><a href="<?php echo url('/seller/index/index'); ?>">商户登录</a></div>
    </form>
</div>
</div> 
<div id="footer">
    <p>2018 &copy; <a href="<?php echo htmlentities($sys['url']); ?>"><?php echo htmlentities($sys['name']); ?></a></p>
</div>
<script src="/static/plugins/layui/layui.js"></script>



<script>
    layui.use(['form', 'layer'], function () {
        var form = layui.form,$ = layui.jquery;
        // 登录提交监听
        form.on('submit(logsub)', function (data) {
            var loading = layer.load(1, {shade: [0.1, '#fff']});
            $.post("<?php echo url('index'); ?>",data.field,function(res){
                layer.close(loading);
                if(res.code===1){
                    layer.msg(res.msg,{time:1000,icon:1},function(){
                        location.href = "<?php echo url('index/index'); ?>";
                    });
                }else{
                    layer.msg(res.msg,{time:1000,icon:2});
                    $('.rtip img').attr('src','<?php echo url("verify"); ?>?id='+Math.random());
                }
            });
            return false;
        })
    })
</script>
</body>
</html>
